<div class="row" style="margin-bottom: 60px">
    <div class="col-md-12">
        <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse"
                        data-target="#bs-example-navbar-collapse-1"><span
                        class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span
                        class="icon-bar"></span><span class="icon-bar"></span></button>
                <a class="navbar-brand" href="/">API</a>
            </div>

            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul id="menuList" class="nav navbar-nav">
                </ul>

                <ul class="nav navbar-nav navbar-right">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                           aria-expanded="false">${currentUser().username ?! '个人中心' } <span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li><a href="/user/home">个人中心</a></li>
                            <li><a href="/user/changePassword">修改密码</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="/logout">登出</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </nav>
    </div>
</div>

<script>
    $(function () {
        $.get("/getMenuList", function (data, status) {
            if (data && data.result === 100 && data.data) {
                $('#menuList').html(data.data);
            }
        });
    });
</script>